-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement local filtering in file list #26841
Conversation
So yeah, it doesn't work fully, but it is better than on 19. On 19 the search box is emptied and visible but the filter is still applied, giving you even more headache :P From my POV this is already a huge step forward and should be merged + backported. |
75d973e
to
dad385f
Compare
Fixes #23432 |
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
I'll be leaving the follow up points for later as I agree with @nickvergessen that this is already a huge step forward and the old implementation had similar flaws when switching the file list:
|
Diff in case it might be useful to make sure that newly initialized filelists also have the filter, but there are some sideeffects when it comes to the loading indicator: import { subscribe } from '@nextcloud/event-bus'
+let searchQuery = ''
+subscribe('nextcloud:unified-search.search', ({ query }) => {
+ searchQuery = query ?? ''
+});
+
(function() {
const FilesPlugin = {
attach(fileList) {
+ // Initialize the file list with the current query in case there was a search before switching to the list
+ fileList.setFilter(searchQuery)
+
subscribe('nextcloud:unified-search.search', ({ query }) => {
fileList.setFilter(query)
})
|
Signed-off-by: Julius Härtl <[email protected]>
dad385f
to
9c937a6
Compare
/backport to stable22 |
/backport to stable21 |
/backport to stable20 |
👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works 👍
It's only strange that the dropdown also shows the same results after a while, but no biggie
The backport to stable22 failed. Please do this backport manually. |
The backport to stable21 failed. Please do this backport manually. |
The backport to stable20 failed. Please do this backport manually. |
Bring back local file list filtering which got removed with the implementation of unified search. It additionally introduces a bundled entrypoint for the files app which now unifies search handling, templates and the files app settings in the left navigation sidebar.